{% extends "base.html" %}
{% block menu %}
<ul class="box">
	<li><a href="/index"><span>首页</span></a></li>
	<li><a href="/monitor"><span>服务监控</span></a></li>
	<li><a href="/report"><span>服务报表</span></a></li>
	<li><a href="/alert"><span>报警管理</span></a></li>
	<li><a href="/flow"><span>流程管理</span></a></li>
	<li id="menu-active"><a href="/doc"><span>运维文档</span></a></li>
	<li><a href="/host"><span>服务主机</span></a></li>
	<li><a href="/accident"><span>事故中心</span></a></li>
</ul>
{% endblock %}

{% block content %}
<div id="mon-tit">
    <div class="left">暴风文档中心 >> 查看文档信息</div>
    <div class="right"><a></a></div>
</div>
<div class="clr"></div>
    {% if errors %}
        <ul>
            {% for error in errors %}
            <li>{{ error }}</li>
            {% endfor %}
        </ul>
    {% endif %}
<hr>
	<h3 class='tit'>文档详情</h3></br>
		文档标题：{{ doc.name }}</br>
		文档内容：
	<div id="content">
		{% autoescape off %}
			{{ doc.context}}
		{% endautoescape %}
	</div></br></br>
		文档类型：{{ doc.type }}</br></br>
		文档状态：{{ doc.status }}</br></br>
		文档创建时间：{{ doc.timestamp|date:"Y-m-d H:i:s" }}</br></br>
	<hr></br>
	<div id="content">
	<h3 class='tit'>评审记录</h3>
        <div  class="flow-dis right-col">
            <div class="title">
                <span style="width:15%">评审人</span>
                <span style="width:50%">评审意见</span>
                <span style="width:10%">评审</span>
                <span style="width:25%">评审时间</span>
            </div>
			{% for c in clist %}
            <div class="{% cycle 'ji' 'ou' %}">
                <span style="width:15%">{{ c.uid }}</span>
                <span style="width:50%">{{ c.content }}</span>
                <span style="width:10%">{%ifequal c.record "1" %}通过{% else %}未通过{% endifequal %}</span>
                <span style="width:25%">{{ c.timestamp|date:"Y-m-d H:i:s" }}</span>
            </div>
			{% endfor %}
        </div>
	</div></br>
	<hr></br>
	<div id="content">
	<h3 class='tit'>评审区：</h3>
	当前用户：{{ username }}</br></br>
	<form action="/doc/comment/" method="post">
		评审意见：</br><textarea name="content" cols="50" rows="5" id="content" style="border: 1 solid #888888;LINE-HEIGHT:18px;padding: 3px;"></textarea>
		</br></br>
		<!--
		文档评分：&nbsp;&nbsp;[平均分大于3分时文档显示通过评审]</br></br>&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="radio" name="score" value = "1">1分&nbsp;&nbsp;
		<input type="radio" name="score" value = "2">2分&nbsp;&nbsp;
		<input type="radio" name="score" value = "3">3分&nbsp;&nbsp;
		<input type="radio" name="score" value = "4">4分&nbsp;&nbsp;
		<input type="radio" name="score" value = "5">5分&nbsp;&nbsp;
		-->
		是否通过：
		<input type="radio" name="status" value = "1">通过&nbsp;&nbsp;
		<input type="radio" name="status" value = "0">不通过</br></br>
		<input type="hidden" name="id" value={{ id }}>
		<input type="submit" value="提交"></br></br>
	</form>
	</div>
	<hr>
{% endblock %}